<?
 if(!isset($collectionmenu)){
 	$collectionmenu='';
 }
  if(!isset($pagesmenu)){
 	$pagesmenu='';
 }
 
 ?>
 
<div class='mainnavi'>
<ul>
<? 
if($this->auth->logged_in('webadmin') OR $this->auth->logged_in('admin')){
?>
<li class='navitree_main'><?= html::anchor(CONTDIR.'page','NAVITREES', ($this->uri->segment(2)=='page' ? array('class'=>'selected') : array())).$pagesmenu?></li>
<li class='collection_main'><?= html::anchor(CONTDIR.'collection/listall','COLLECTIONS', ($this->uri->segment(2)=='collection' ? array('class'=>'selected') : array())).$collectionmenu ?></li>
<li class='media_main'><?= html::anchor(CONTDIR.'media/listall','MEDIEN', ($this->uri->segment(2)=='media' ? array('class'=>'selected') : array()))?></li>
<li class='media_main'><?= html::anchor(CONTDIR.'site/staticpage/start','SITE', ($this->uri->segment(2)=='site' ? array('class'=>'selected') : array()))?></li>
<?
}
?>

<?
$modulenavi=new View('modulenavi');
echo $modulenavi;
?>

<? 
if($this->auth->logged_in('admin')){
?>
<li><?= html::anchor(CONTDIR.'user','USER', ($this->uri->segment(2)=='user' ? array('class'=>'selected') : array()))?></li>   
<li><?= html::anchor(CONTDIR.'role','ROLES', ($this->uri->segment(2)=='role' ? array('class'=>'selected') : array()))?></li>   
<li><?= html::anchor(CONTDIR.'contentmodule/listall','CONTENT MODULE', ($this->uri->segment(2)=='contentmodule' ? array('class'=>'selected') : array()))?></li>
<li><?= html::anchor(CONTDIR.'pagetemplate','TEMPLATES', ($this->uri->segment(2)=='pagetemplate' ? array('class'=>'selected') : array()))?></li>
<li><?= html::anchor(CONTDIR.'setting','SETTINGS', ($this->uri->segment(2)=='setting' ? array('class'=>'selected') : array()))?></li>

<?
}
?>

<li class='preview_main'><?= html::file_anchor('','PREVIEW', array('target'=>'preview'))?></li>
</ul>



<div class='loggedin'>
Eingeloggt als User <? 
if($this->auth->logged_in()){
	echo $this->user->username;
	echo '<br />';
	echo html::anchor('login/logout', 'logout');
}
?>
</div>

</div>     
